/*
@authors - Siddharth Sathyam, Pat LaMontagna, Alan Ruvalcaba
@Description - Main class for Server

10/13/2011 ssathy2 Written
**/

#include <QtCore/QCoreApplication>
#include <QTime>
#include <QDebug>
#include "server.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QTime clock;
    Server *centralServer = new Server();
    if(centralServer->startServer(QHostAddress::LocalHost, 1234))
    {
	qDebug() << clock.currentTime().toString(Qt::TextDate) << ": Server Started at - " << centralServer->serverAddress().toString() << ":" << centralServer->serverPort();
    }
    else
    {
	qDebug() << clock.currentTime().toString(Qt::TextDate) << ": Problem starting server - " << centralServer->errorString();
    }
    return a.exec();
}
